package com.qf.vote.vo;

import lombok.Data;

@Data
public class R {

    private Integer code;

    private String msg;

    private Object data;

    public static R ok(){
        R resultVo = new R();

        resultVo.setCode(1);
        resultVo.setMsg("ok");

        return resultVo;
    }

    /**
     * 返回通用的成功的响应信息
     * @return
     */
    public static R ok(Object o){
        R resultVo = new R();

        resultVo.setCode(1);
        resultVo.setMsg("ok");
        resultVo.setData(o);

        return resultVo;
    }

}
